package cn.geminis.warehouse.service.purchase.entity;

import cn.geminis.lowcode.annotation.*;
import cn.geminis.warehouse.service.basic.entity.ProductBatch;
import jakarta.persistence.Column;
import jakarta.persistence.ManyToOne;
import lombok.Getter;
import lombok.Setter;

/**
 * 入库验收问题明细
 */
@Getter
@Setter
@UuidEntity
@QueryFilter
@CrudRepository
@CrudController(save = false)
public class PurchaseCheckFailed {

    /**
     * 入库单
     */
    @ManyToOne(optional = false)
    @QueryFilterProperty(fieldName = "purchase.id", propertyName = "purchaseId", propertyType = "String")
    private Purchase purchase;

    /**
     * 商品批次
     */
    @ManyToOne(optional = false)
    @QueryFilterProperty(fieldName = "productBatch.id", propertyName = "productBatchId", propertyType = "String")
    private ProductBatch productBatch;

    /**
     * 商品数量
     */
    @Column(nullable = false)
    private int amount;

    /**
     * 说明
     */
    @Column(length = 2048)
    private String memo;

}
